<template>
	<view class="container">
		<view>
			<desc-wrapper :title="title" :desc="desc"></desc-wrapper>
			<!-- <z-card>
				<view class="dividing_line">
					<view class="enhance-text">查询结果</view>
					<view class="card-content-item" v-for="(value, k) in resp.base_info" :key="k">
						<view class="desc-text flex-row justify-between">
							<block v-if="keymap[k]">
								<text class="shrink-0 enhance-text">{{ keymap[k] }}:</text>
								<text>{{ resp.base_info[k] }}</text>
							</block>
						</view>
					</view>
				</view>
				<view class="dividing_line">
					<view class="card-content-item" v-for="(value, k) in resp.bazi_info" :key="k">
						<view class="desc-text flex-row justify-between">
							<block v-if="keymap[k]">
								<text class="shrink-0 enhance-text">{{ keymap[k] }}:</text>
								<text>{{ resp.bazi_info[k] }}</text>
							</block>
						</view>
					</view>
				</view>
				<view class="dividing_line">
					<view class="card-content-item" v-for="(value, k) in resp.tongziming" :key="k">
						<view class="desc-text flex-row justify-between">
							<block v-if="keymap1[k]">
								<text class="shrink-0 enhance-text">{{ keymap1[k] }}:</text>
								<text>{{ resp.tongziming[k] }}</text>
							</block>
						</view>
					</view>
				</view>
			</z-card> -->
			<z-card title="基本信息">
				<block v-if="resp">
					<view class="card-content-item">
						<text class="card-content-label_left ">您缘主姓名:</text>
						<text class="card-content_right card-text-red">{{resp.base_info.name}}</text>
					</view>
					<view class="card-content-item">
						<text class="card-content-label_left ">出生公历:</text>
						<text class="card-content_right">{{resp.base_info.gongli }}</text>
					</view>
					<view class="card-content-item">
						<text class="card-content-label_left ">出生农历:</text>
						<text class="card-content_right">{{resp.base_info.nongli}}</text>
					</view>
					<view class="card-content-item">
						<text class="card-content-label_left ">八字生辰:</text>
						<text class="card-content_right">第{{resp.bazi_info.bazi }}</text>
					</view>
					<view class="card-content-item">
						<text class="card-content-label_left ">年柱纳音:</text>
						<text class="card-content_right">{{resp.bazi_info.na_yin}}</text>
					</view>
					<view class="card-content-item">
						<text class="card-content-label_left shrink-0">查询结果:</text>
						<text class="card-content_right ">{{resp.tongziming.description}}</text>
					</view>
				</block>

			</z-card>
			<view class="bottom-btns" style="transform: translateY(-100%);" @click="todashi">
				<view class="start-btn">
					<text>大师详解</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title: '童子命查询',
				desc: '本次测算结果仅供娱乐使用，请勿用于封建迷信和违法用途。',
				resp: null,
				// keymap: {
				// 	// sex: '性别',
				// 	name: '缘主姓名',
				// 	// age: '年龄',
				// 	gongli: '出生公历',
				// 	nongli: '出生农历',
				// 	// qiyun: '起运',
				// 	// jiaoyun: '',
				// 	// kw: "空亡",
				// 	// tg_cg_god: '天干十神',
				// 	bazi: '八字生辰',
				// 	na_yin: '年柱纳音',
				// 	// description: '是否为童子命',
				// 	// nayin: '纳音',
				// 	// jijie: "季节",
				// 	// xz: "星座",
				// 	// sx: "生肖"
				// },
				// keymap1: {
				// 	description: '查询结果',
				// }
			}
		},
		onLoad(opt) {
			this.resp = JSON.parse(opt.params)
		},
		methods:{
			todashi(){
				uni.switchTab({
					url:'/pages/tabbar/service'
				})
			}
		}
	}
</script>
<style lang="scss" scoped></style>